how to create local rest api server